import Vue from 'vue'
import Router from 'vue-router';
import login from "../components/login";
import register from "../components/register";
import firstPage from "../views/firstPage";
import registerFoundPage from "../components/registerLostPage";
import registerPage from "../views/registerPage";
import registerLostPage from "../components/registerFoundPage";
import noticeManagementPage from "../components/noticeManagementPage"
import lostManagementPage from "../components/lostManagementPage"
import lostManagementFunctionPage from "../components/lostManagementFunctionPage";
import foundManagementPage from "../components/foundManagementPage";
import overdueNoticeManagementPage from "../components/overdueNoticeManagementPage";
import userPage from "../components/userPage";
import userUserPage from "../components/userUserPage";
import userAdminPage from "../components/userAdminPage";
import myAccount from "../components/myAccount";
import foundGoodsDetailsPage from '../components/foundGoodsDetailsPage'
import lostGoodsDetailsPage from '../components/lostGoodsDetailsPage'
import headComponent from "../components/header_component";

Vue.component("headComponent",headComponent)
Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      component: login
    },
    {
      path: '/head',
      name: 'headComponent',
      component: headComponent
    },
    {
      path: '/login',
      name:login,
      component: login
    },
    {
      path: '/register',
      component: register
    },
    {
      path: '/firstPage',
      name: 'firstPage',
      component: firstPage
    },
    {
      path: '/registerPage',
      component: registerPage,
       children:[{
        path:'/registerPage',
        component:registerFoundPage
      },
        {
          path: '/registerPage/registerFoundPage',
          component: registerFoundPage
        },
        {
          path: '/registerPage/registerLostPage',
          component: registerLostPage
        }
      ]
    },
    {
      path: '/lostManagementPage',
      component: lostManagementPage
    },
    {
      path: '/lostManagementFunctionPage',
      component: lostManagementFunctionPage
    },
    {
      path: '/noticeManagementPage',
      component: noticeManagementPage
    },
    {
      path: '/foundManagementPage',
      component: foundManagementPage
    },
    {
      path: '/overdueNoticeManagementPage',
      component: overdueNoticeManagementPage
    },
    {
      path: '/userPage',
      component: userPage,
      children:[{
        path:'/userPage',
        component:userAdminPage
      },
        {
          path: '/userPage/userUserPage',
          component: userUserPage
        },
        {
          path: '/userPage/userAdminPage',
          component: userAdminPage
        }
      ]
    },
    {
      path: '/myAccount',
      component: myAccount
    },
    {
      path: '/foundGoodsDetailsPage',
      name: 'foundGoodsDetailsPage',
      component: foundGoodsDetailsPage
    },
    {
      path: '/lostGoodsDetailsPage',
      name: 'lostGoodsDetailsPage',
      component: lostGoodsDetailsPage
    }
  ]
})
